<?php
/**
 * 商店模型类
 * @author zengnz
 *
 */
class ShopModel extends CommonModel
{
	protected $tableName = 'shop';
	
	//字段自动验证
	protected $_validate = array(
			array('type','require','店铺类型必须选择！'),
			array('name','require','店铺名称必须填写！'),
			array('brands','require','经营品牌必须填写！'),
			array('province','require','省份必须填写！'),
			array('city','require','城市必须填写！'),
			array('address','require','地址必须填写！'),
			array('tel','require','电话号码必须填写！'),
			array('email','require','email必须填写！'),
			array('name', '', '该店铺名称已经存在!', 0, 'unique', 1),
			array('email', '/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/', 'email格式不符合要求！'),
	);
	
	//定义店铺类型
	public static $shopTypes = array(
			'10001' => '汽车4S店',
			'10002' => '二手车行',
			'10003' => '租车行',
			'10004' => '鞋服',
			'10005' => '餐饮',
			'10006' => '杂货店',
			'10007'	=> '二手市场',
			'10008' => '电子产品',
			'10000' => '其他',
	);
	
	public static $carArticleTypes = array(
			'1001' => '促销活动',
			'1002' => '置换信息',
			'1003' => '车友活动',
			'1004' => '新车上市',
			'1005' => '维修保养',
			'1006' => '企业新闻',
			'1007' => '汽车用品',
	);
	
	
}